package com.villaday.idf.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by tudou on 2018/9/20.
 */

public class SheBeiEntity implements Parcelable {

    /**
     * code : dianshiji
     * icon : &#xe6c3;
     * iconClass : dianshiji
     * name : 电视机
     */

    private String code;
    private String icon;
    private String iconClass;
    private String name;
    private int type;

    public SheBeiEntity(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public SheBeiEntity(String code, String icon, String iconClass, String name) {
        this.code = code;
        this.icon = icon;
        this.iconClass = iconClass;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getIconClass() {
        return iconClass;
    }

    public void setIconClass(String iconClass) {
        this.iconClass = iconClass;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeString(this.icon);
        dest.writeString(this.iconClass);
        dest.writeString(this.name);
        dest.writeInt(this.type);
    }

    protected SheBeiEntity(Parcel in) {
        this.code = in.readString();
        this.icon = in.readString();
        this.iconClass = in.readString();
        this.name = in.readString();
        this.type = in.readInt();

    }

    public static final Parcelable.Creator<SheBeiEntity> CREATOR = new Parcelable.Creator<SheBeiEntity>() {
        @Override
        public SheBeiEntity createFromParcel(Parcel source) {
            return new SheBeiEntity(source);
        }

        @Override
        public SheBeiEntity[] newArray(int size) {
            return new SheBeiEntity[size];
        }
    };
}
